from django.shortcuts import render
from rest_framework.views import APIView
from app.models import GoodsModel
from app.ser import GoodsSerializer
from rest_framework.response import Response

# Create your views here.


class GoodsView(APIView):
    def get(self,request):
        goods = GoodsModel.objects.all()
        ser = GoodsSerializer(goods,many=True)
        return Response(ser.data)
